package org.donghuan.rms.framework.domain;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.Date;

public class IDentity implements PropertyChangeListener {

	private Long id;
	private String fullName;
	private String nation;
	private Date birthday;
	private String identityNumber;
	private String familyRegister;
	private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(
			this);

	public IDentity() {
	}

	public IDentity(String fullName, String nation, Date birthday,
			String identityNumber, String familyRegister) {
		super();
		this.fullName = fullName;
		this.nation = nation;
		this.birthday = birthday;
		this.identityNumber = identityNumber;
		this.familyRegister = familyRegister;
	}

	public IDentity(String fullName) {
		this.fullName = fullName;
	}

	public Long getId() {
		return id;
	}

	public String getFullName() {
		return fullName;
	}

	public String getNation() {
		return nation;
	}

	public Date getBirthday() {
		return birthday;
	}

	public String getIdentityNumber() {
		return identityNumber;
	}

	public String getFamilyRegister() {
		return familyRegister;
	}

	public void setId(Long id) {
		propertyChangeSupport.firePropertyChange("id", this.id, this.id = id);
	}

	public void setFullName(String fullName) {
	}

	public void setNation(String nation) {
		propertyChangeSupport.firePropertyChange("nation", this.nation,
				this.nation = nation);
	}

	public void setBirthday(Date birthday) {
		propertyChangeSupport.firePropertyChange("birthday", this.birthday,
				this.birthday = birthday);
	}

	public void setIdentityNumber(String identityNumber) {
		propertyChangeSupport.firePropertyChange("identityNumber",
				this.identityNumber, this.identityNumber = identityNumber);
	}

	public void setFamilyRegister(String familyRegister) {
		propertyChangeSupport.firePropertyChange("familyRegister",
				this.familyRegister, this.familyRegister = familyRegister);
	}

	@Override
	public void propertyChange(PropertyChangeEvent evt) {

	}

}
